<style type="text/css">
    .layui-layer-page .layui-layer-content{
        overflow: initial;
    }
</style>
<div class="child-box">
    <div class="layui-card layadmin-header">
        <div class="layui-breadcrumb" lay-filter="breadcrumb">
            <a href="javascript:" lay-href=""><i class="iconfont iconhome"></i>首页</a>
            <a href="javascript:" lay-href="/order/list">委托进口</a>
            <a><cite>快捷下单</cite></a>
            <div class="layui-card-header-left" title="刷新" zmark-event="layui.manage.render">
                <i class="layui-icon layui-icon-refresh layui-anim" zmark-anim="layui-anim-rotate"></i>
            </div>
        </div>
    </div>

    <div class="layui-card mt20">
        <form class="layui-form" method="post" lay-filter="form-order-base" id="orderMainForm">
            <input type="hidden" name="id" id="id"/>
            <input type="hidden" name="docNo" id="docNo"/>
            <input type="hidden" name="customerName" value="-"/>
            <div class="layui-card-header"><span class="def-fc left-split">基础信息</span></div>
            <div class="layui-card-body">
                <div class="top-tips lnline" id="order-audit-opinion-tips">
                    <div><p></p><a href="javascript:;" class="close-tooltip" close-tooltip>×</a></div>
                </div>
                <div class="layui-row">
                    <div class="layui-col-md4 pr10">
                        <label class="layui-form-label">客户订单号</label>
                        <div class="layui-input-block">
                            <input name="clientNo" id="clientNo" class="layui-input" placeholder="客户订单号" clear-val/>
                        </div>
                    </div>
                    <div class="layui-col-md8">
                        <div class="layui-col-md10">
                            <label class="layui-form-label"><span class="text-danger">*</span>境外供应商</label>
                            <div class="layui-input-block">
                                <input type="hidden" id="supplierId" name="supplierId"/>
                                <input name="supplierName" id="order-add-supplier-name" class="layui-input required"
                                       placeholder="支持模糊搜索" clear-val/>
                            </div>
                        </div>
                        <div class="layui-col-md2 pr10 pl10">
                            <button type="button" zmark-event="layui.orderManage.supplierManage" class="layui-btn layui-btn-fluid"><i
                                    class="iconfont icontianjia"></i>新增
                            </button>
                        </div>
                    </div>
                </div>
                <div class="layui-row">
                    <div class="layui-col-md4 pr10">
                        <label class="layui-form-label"><span class="text-danger">*</span>业务类型</label>
                        <div class="layui-input-block required-box">
                            <select name="businessType" id="businessType" lay-filter="select-order-business-type"
                                    class="required">
                                <option value="">请选择业务类型</option>
                            </select>
                        </div>
                    </div>
                    <div class="layui-col-md4 pr10">
                        <label class="layui-form-label"><span class="text-danger">*</span>成交方式</label>
                        <div class="layui-input-block required-box">
                            <select name="transactionMode" class="required" id="transactionMode"></select>
                        </div>
                    </div>
                    <div class="layui-col-md4 pr10">
                        <label class="layui-form-label">报关类型</label>
                        <div class="layui-input-block">
                            <input type="text" class="layui-input layui-disabled" id="declareTypeName"
                                   name="declareTypeName" readonly/>
                        </div>
                    </div>
                </div>

                <div class="layui-row">
                    <div class="layui-col-md12 pr10">
                        <label class="layui-form-label"><span class="text-danger">*</span>协议报价</label>
                        <div class="layui-input-block required-box">
                            <select name="impQuoteId" id="impQuoteId" class="required"></select>
                        </div>
                    </div>
                </div>

                <div class="layui-row">
                    <div class="layui-col-md4">
                        <label class="layui-form-label"><span class="text-danger">*</span>币制</label>
                        <div class="layui-input-block pr10">
                            <input name="currencyName" id="order-add-currency-name" class="layui-input required"
                                   placeholder="币制" clear-val/>
                        </div>
                    </div>
                    <div class="layui-col-md4">
                        <span class="layui-btn zm-hide" id="add-order-show-rate">
                            海关汇率：0.0
                        </span>
                    </div>
                </div>
            </div>
        </form>

        <form class="layui-form" method="post" lay-filter="orderMemberForm" id="orderMemberForm">
            <div class="layui-card-header">
                <span class="def-fc left-split">产品信息</span>
                <div class="fr">
                    <a class="layui-btn layui-btn-xs" href="/template/orderMemberImportTemp.xls"
                       target="_blank">
                        <i class="iconfont iconic_download"></i>点击下载导入模板
                    </a>
                    <a class="layui-btn layui-btn-xs" id="add-order-import-member">
                        <i class="iconfont iconic_upload"></i>点击导入订单明细
                    </a>
                </div>
            </div>
            <div class="layui-card-body">
                <table class="layui-table" lay-size="sm">
                    <colgroup>
                        <col width="45">
                        <col>
                        <col width="120">
                        <col width="100">
                        <col width="45">
                        <col width="70">
                        <col width="55">
                        <col width="70">
                        <col width="50">
                        <col width="70">
                        <col width="70">
                        <col width="60">
                        <col width="45">
                    </colgroup>
                    <thead>
                    <tr>
                        <th>NO</th>
                        <th>型号</th>
                        <th>品名</th>
                        <th>品牌</th>
                        <th>单位</th>
                        <th>数量</th>
                        <th>单价</th>
                        <th>总价</th>
                        <th>箱数</th>
                        <th>净重(KG)</th>
                        <th>毛重(KG)</th>
                        <th>产地</th>
                        <th>操作</th>
                    </tr>
                    </thead>
                    <tbody id="materialBody"></tbody>
                    <tfoot>
                    <tr>
                        <th colspan="13">
                            <div style="padding:2px">
                                <a href="javascript:" onclick="layui.orderManage.createRow()"><i
                                        class="iconfont icontianjia"></i>添加一行</a>
                            </div>
                        </th>
                    </tr>
                    <tr>
                        <th colspan="13">
                            <div class="layui-row">
                                <div class="layui-col-md2">
                                    总数量：<h2 style="display: inline-block" id="quantityTotal">0.0</h2>
                                </div>
                                <div class="layui-col-md2">
                                    总价：<h2 style="display: inline-block" id="totalPrice">0.0</h2>
                                </div>
                                <div class="layui-col-md2">
                                    总净重：<h2 style="display: inline-block" id="netWeightTotal">0.0000</h2>
                                </div>
                                <div class="layui-col-md2">
                                    总毛重：<h2 style="display: inline-block" id="grossWeightTotal">0.0000</h2>
                                </div>
                                <div class="layui-col-md2">
                                    总箱数：<h2 style="display: inline-block" id="cartonTotal">0</h2>
                                </div>
                            </div>
                        </th>
                    </tr>
                    </tfoot>
                </table>
            </div>
        </form>

        <form class="layui-form" method="post" lay-filter="form-order-logistics" id="orderLogisticsForm">
            <div class="layui-card-header">
                <span class="def-fc left-split">境外交货</span>
            </div>
            <div class="layui-card-body">
                <div class="layui-row">
                    <div class="layui-col-md4">
                        <label class="layui-form-label"><span class="text-danger">*</span>交货方式</label>
                        <div class="layui-input-block required-box pr10">
                            <select lay-filter="select-add-order-delivery-mode" id="deliveryMode"
                                    name="deliveryMode"></select>
                        </div>
                    </div>
                </div>

                <div class="zm-hide" mark="deliveryMode" zm-key="ExpressDelivery">

                    <div class="layui-row">
                        <div class="layui-col-md4">
                            <label class="layui-form-label"><span class="text-danger">*</span>快递类型</label>
                            <div class="layui-input-block pr10">
                                <input type="radio" name="inExpressType" value="local" title="本地快递" checked/>
                                <input type="radio" name="inExpressType" value="abroad" title="境外快递"/>
                            </div>
                        </div>
                    </div>

                    <div class="layui-row">
                        <div class="layui-col-md4">
                            <label class="layui-form-label"><span class="text-danger">*</span>快递公司</label>
                            <div class="layui-input-block required-box pr10">
                                <select id="hkExpress" name="hkExpress"></select>
                            </div>
                        </div>

                        <div class="layui-col-md4">
                            <label class="layui-form-label">快递单号</label>
                            <div class="layui-input-block pr10">
                                <input type="text" name="hkExpressNo" id="hkExpressNo" class="layui-input"
                                       placeholder="多个快递单号请用 , 隔开" clear-val/>
                            </div>
                        </div>
                    </div>
                </div>

                <div class="zm-hide" mark="deliveryMode" zm-key="TakeDelivery">
                    <div class="layui-row">
                        <div class="layui-col-md4">
                            <label class="layui-form-label"><span class="text-danger">*</span>要求提货时间</label>
                            <div class="layui-input-block pr10">
                                <input type="text" name="takeTime" id="takeTime" class="layui-input picker-time required"
                                       placeholder="请填写要求提货时间" clear-val/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-md8">
                            <label class="layui-form-label">提货委托书</label>
                            <div class="layui-input-block pr10">
                                <div class="upload-box" file-id="" file-type="imp_order" business-type="imp_order_information" file-memo="境外提货委托书"></div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-md12">
                            <label class="layui-form-label">提货信息</label>
                            <div class="layui-input-block">
                                <div class="layui-input-range" style="margin-bottom: 8px;">
                                    <a class="layui-btn layui-btn-xs" href="javascript:" onclick="layui.orderManage.takeInformationManage()"><i class="iconfont icontianjia"></i>新增提货信息</a>
                                    <a class="layui-btn layui-btn-xs" href="javascript:" onclick="layui.orderManage.takeInformation()"><i class="iconfont iconshuaxin1"></i>刷新提货信息</a>
                                    <div class="range-list scrollbar" id="takeInformations"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-row">
                    <div class="layui-col-md8">
                        <label class="layui-form-label">交货备注</label>
                        <div class="layui-input-block">
                            <input type="text" name="deliveryModeMemo" id="deliveryModeMemo" placeholder="其他交货要求请填写在此处"
                                   class="layui-input" clear-val/>
                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-card-header">
                <span class="def-fc left-split">国内配送</span>
            </div>
            <div class="layui-card-body">

                <div class="layui-row">
                    <div class="layui-col-md4">
                        <label class="layui-form-label"><span class="text-danger">*</span>送货方式</label>
                        <div class="layui-input-block pr10 required-box">
                            <select lay-filter="select-add-order-receiving-mode" id="receivingMode" name="receivingMode"></select>
                        </div>
                    </div>

                    <div class="layui-col-md4" mark="receivingMode" zm-key="ThirdLogistics">
                        <label class="layui-form-label"><span class="text-danger">*</span>送货付款方式</label>
                        <div class="layui-input-block pr10">
                            <input type="radio" name="paymentDelivery" value="TOPAY" title="到付" checked/>
                            <input type="radio" name="paymentDelivery" value="ADVPAY" title="垫付"/>
                        </div>
                    </div>
                </div>

                <div class="layui-row" mark="receivingMode" zm-key="ThirdLogistics">
                    <div class="layui-col-md4">
                        <label class="layui-form-label"><span class="text-danger">*</span>物流公司</label>
                        <div class="layui-input-block pr10 required-box">
                            <select lay-filter="select-add-order-logistics-company" id="logisticsCompany" name="logisticsCompanyId"></select>
                        </div>
                    </div>
                    <div class="layui-col-md8">
                        <label class="layui-form-label"><span class="text-danger">*</span>时效要求</label>
                        <div class="layui-input-block pr10">
                            <div id="askContainer"></div>
                        </div>
                    </div>
                </div>
                <div class="layui-row" mark="receivingMode" zm-key="ThirdLogistics,HkThrough,SpecialCar">
                    <div class="layui-col-md12">
                        <label class="layui-form-label">收货信息</label>
                        <div class="layui-input-block">
                            <div class="layui-input-range" style="margin-bottom: 8px;">
                                <a class="layui-btn layui-btn-xs" href="javascript:" onclick="layui.orderManage.deliveryInformationManage()"><i class="iconfont icontianjia"></i>新增收货信息</a>
                                <a class="layui-btn layui-btn-xs" href="javascript:" onclick="layui.orderManage.deliveryInformation()"><i class="iconfont iconshuaxin1"></i>刷新收货信息</a>
                                <div class="range-list scrollbar" id="deliveryInformations"></div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="zm-hide" mark="receivingMode" zm-key="SelfLifting">
                    <div class="layui-row">
                        <div class="layui-col-md12">
                            <label class="layui-form-label">自提点</label>
                            <div class="layui-input-block">
                                <select id="selfWare" name="selfWareId"></select>
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-md8">
                            <label class="layui-form-label"><span class="text-danger">*</span>姓名电话</label>
                            <div class="layui-input-block">
                                <input type="text" name="selfLinkPerson" id="selfLinkPerson"
                                       placeholder="请输入提货人名称和电话 (多个 ，隔开)" class="layui-input required" clear-val/>
                            </div>
                        </div>
                    </div>
                    <div class="layui-row">
                        <div class="layui-col-md8">
                            <label class="layui-form-label"><span class="text-danger">*</span>提货人身份证</label>
                            <div class="layui-input-block">
                                <input type="text" name="selfPersonId" id="selfPersonId" class="layui-input required"
                                       placeholder="请输入提货人身份证" clear-val/>
                            </div>
                        </div>
                    </div>

                    <div class="layui-row">
                        <div class="layui-col-md8">
                            <label class="layui-form-label">提货盖章委托书</label>
                            <div class="layui-input-block">
                                <div class="upload-box" file-id="" file-type="imp_order" business-type="imp_order_entrust" file-memo="委托单盖章件"></div>
                            </div>
                        </div>
                    </div>

                    <div class="layui-row">
                        <div class="layui-col-md8">
                            <label class="layui-form-label">提货备注</label>
                            <div class="layui-input-block">
                                <input type="text" name="selfMemo" id="selfMemo" placeholder="其他自提要求请填写在此处"
                                       class="layui-input" clear-val/>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="layui-row">
                    <div class="layui-col-md8">
                        <label class="layui-form-label">收货备注</label>
                        <div class="layui-input-block">
                            <input type="text" name="receivingModeMemo" id="receivingModeMemo"
                                   placeholder="其他收货要求请填写在此处" class="layui-input" clear-val/>
                        </div>
                    </div>
                </div>
            </div>
        </form>

        <form class="layui-form" method="post" lay-filter="orderOtherForm" id="orderOtherForm">
            <div class="layui-card-header"><span class="def-fc left-split"><i class="fa fa-file-code-o"></i>备注及其它</span>
            </div>
            <div class="layui-card-body" style="padding-bottom: 50px;">
                <div class="layui-row">
                    <div class="layui-col-md4 pr10" style="margin-left: 110px">
                        <div class="upload-box" style="min-height: 60px" file-id="" file-type="imp_order" max-size="10" business-type="imp_order_pi" file-memo="装箱单/发票"></div>
                    </div>
                    <div class="layui-col-md4 pr10">
                        <div class="upload-box" style="min-height: 60px" file-id="" file-type="imp_order" max-size="10" business-type="imp_order_other" file-memo="其它资料"></div>
                    </div>
                </div>
                <div class="layui-row pt10">
                    <div class="layui-col-md8" style="width: 748px;">
                        <label class="layui-form-label">订单备注</label>
                        <div class="layui-input-block">
                            <textarea name="memo" id="memo" class="layui-textarea"></textarea>
                        </div>
                    </div>
                </div>
                <div class="layui-row pt20 pb20">
                    <div class="layui-col-md8 pr10 normal" style="margin-left: 110px;width: 748px;">
                        <button type="button" id="temporarySave" class="layui-btn layui-btn-normal sub-order-btn"><i class="iconfont iconlunkuohua22_bangdingshebeifuben2"></i>暂存订单</button>
                        <button type="button" id="submitSave" class="layui-btn sub-order-btn"><i class="iconfont iconicon-1"></i>提交订单</button>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>
<script>
    layui.use('orderManage', layui.factory('orderManage'));
</script>